<template>
	<view class="content">
		<view class="main_info">
			<view class="userAva">
				<open-data class="userAva" type="userAvatarUrl"></open-data>
			</view>
			<view class="user_info">
				<view>
					<open-data type="userNickName"></open-data>
				</view>
				<view class="tag">
					<open-data type="userCity" lang="zh_CN"></open-data>
				</view>
			</view>
			<!-- <image class="ave" src="../../static/icon/ave.png" mode="widthFix"></image>
			<p class="nickName">路德维希`普朗克</p>	 -->
		</view>
		<view class="grey_bar"></view>
		<view class="collect">
			<view class="li">
				<view>42</view>
				<view>收藏</view>

			</view>
			<view class="li">
				<view>42</view>
				<view>点赞</view>

			</view>
			<view class="li">
				<view>42</view>
				<view>关注</view>

			</view>
		</view>
		<view class="grey_bar"></view>
		<view class="order">
			<view class="grace-title grace-margin-top ml10 mr10" >
				<text class="grace-title-text grace-black">我的订单</text>
				<navigator url="../components/order/orderCenter" class="grace-text-small grace-gray">查看全部订单<text class="grace-icons icon-arrow-right"></text></navigator>
			</view>
			<view class="list padding flex justify-between align-center">
				<view v-for="(item,index) in params.order_info" :key="index" @click="$common.routerTo('../components/order/orderCenter')">
					<view class="demo-face grace-relative grace-img-in">
						<image :src="`../../static/icon/order/order_${item.status+1}.png`" mode="widthFix"></image>
						<view class="grace-badge grace-bg-yellow grace-badge-absolute">{{item.num}}</view>
					</view>
					<view class="name">{{item.name}}</view>
				</view>
			</view>

		</view>
		<view class="grey_bar"></view>
		<view class="grace-list grace-margin-top grace-bg-white">
			<view class="grace-list-items" @click="$common.routerTo('../components/address/addressList')">
				<view class="grace-list-body grace-border-b">
					<view class="grace-list-title">
						<text class="grace-list-title-text">地址管理</text>
					</view>
				</view>
				<text class="grace-list-arrow-right grace-icons icon-arrow-right"></text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				params: {
					order_info: [{
						name: "待付款",
						status: 0,
						icon: "",
						num: "21"
					}, {
						name: "待发货",
						status: 1,
						icon: "",
						num: "43"
					}, {
						name: "待付款",
						status: 2,
						icon: "",
						num: "12"
					}, {
						name: "待付款",
						status: 3,
						icon: "",
						num: "13"
					}, {
						name: "待付款",
						status: 4,
						icon: "",
						num: "12"
					}, ]
				}
			}
		},
		methods: {
			RouterTo(url) {
				uni.navigateTo({
					url:url
				});
			}
		}
	}
</script>

<style lang="less" scoped>
	.content {
		.grey_bar {
			height: 30rpx;
			display: inline-block;
			background: #f1f1f1;
			width: 100vw;
		}

		.main_info {
			background-color: #fff;
			text-align: center;
			padding: 0 30upx 33upx;
			display: flex;
			margin-bottom: 30upx;

			.user_info {
				text-align: left;
				flex: 1;
				font-size: 38upx;
				font-weight: bold;
				line-height: 70upx;

				.tag {
					display: inline-block;
					padding: 0 10upx;
					line-height: 38upx;
					background-image: linear-gradient(rgba(241, 241, 241, 1),
						rgba(241, 241, 241, 1)),
						linear-gradient(270deg,
						rgba(255, 215, 98, 1) 0%,
						rgba(255, 191, 0, 1) 100%),
						linear-gradient(rgba(241, 241, 241, 1),
						rgba(241, 241, 241, 1));
					background-blend-mode: normal,
						normal,
						normal;
					border-radius: 17upx;
					// color: rgba(96, 96, 96, 1);
					font-weight: 100;
					font-size: 20upx;
				}
			}

			.userAva {
				width: 138upx;
				border-radius: 50%;
				overflow: hidden;
				margin-right: 38upx;
			}
		}

		.collect {
			display: flex;
			text-align: center;
			background: #fff;
			padding: 40upx 0 25upx;
			// margin-bottom: 20upx;

			&>.li {
				flex: 1;

				&>view:nth-child(1) {
					font-size: 46upx;
					font-weight: bold;
					letter-spacing: 0px;
					color: rgba(0, 0, 0, 1);
				}

				&>view:nth-child(2) {
					font-size: 24upx;
					font-weight: normal;
					letter-spacing: 0px;
					color: rgba(96, 96, 96, 1);
				}
			}
		}

		.order {
			background-color: #fff;

			.tops {
				border-bottom: 1upx solid rgba(0, 0, 0, .02);

				.title {
					font-weight: bold;
				}

				.text {
					text-align: right;
					flex: 1;
					color: rgba(170, 170, 170, 1);
					font-size: 28upx;
				}

				.icon {
					color: rgba(170, 170, 170, .4);
					// font-size: 40upx;
				}
			}

			.list {
				text-align: center;
				display: flex;

				&>view {
					flex: 1;

					image {
						width: 44upx;
						margin: 20upx 0 15upx;
					}

					.grace-badge {
						height: 26rpx;
						line-height: 26rpx;
						font-size: 18rpx;
						right: 15upx;

					}


					.cu-avatar {
						background: none;
					}

					.name {
						font-size: 24upx;
						color: rgba(170, 170, 170, 1);
					}
				}

			}



		}

		.grace-margin-top {
			margin-top: 0;
		}
	}
</style>
